package com.sinosoft.brokerchannel.base.server;

import com.sinosoft.brokerchannel.base.bins.TGatewayChannelInfo;
import com.sinosoft.brokerchannel.base.dao.TGatewayChannelInfoMapper;
import com.sinosoft.brokerchannel.base.utile.BusinessException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * 渠道信息管理服务
 */
@Service
public class ChannelInfoService {
    @Autowired
    private TGatewayChannelInfoMapper tGatewayChannelInfoMapper;
    /**
     * @param channelCode 渠道信息
     * @return {@link TGatewayChannelInfo}
     * @throws BusinessException
     * @方法描述:获取渠道信息
     * @参数说明：
     */
//    @Cacheable("getChannelInfo")
    public TGatewayChannelInfo getChannelInfo(String channelCode) throws BusinessException {
        return tGatewayChannelInfoMapper.selectByPrimaryKey(channelCode);
    }
}
